package com.ymatou.iapi.thirdpartysync.service;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

import com.ymt.base.YmatouBaseCall;
import com.ymttest.utils.EnvSetup;
/**
*获取可用的品牌列表Call
*FreeMaker Template自动生成代码
*/
public class getValidBrandListCall extends YmatouBaseCall{
	private static String opurl ="fql/getValidBrandList";
	
	public getValidBrandListCall() {
		super(EnvSetup.getSystemUrl("thirdpartysync_iapi"),opurl,"GET","PARAM");
	}
	@Override
	public void addDefHeader() {
		client.addHeader("Accept","text/xml,text/javascript,text/html,application/json");
		client.addHeader("Content-Type", "application/json; charset=UTF-8");
	}
	
	public String getSuccess()
    {
        return getString("success");
    }
	
	public JSONArray getBrandIdList()
    {
	   return  JSONObject.fromObject(getString("data")).getJSONArray("brandIdList");
	}
}